<template>
  <view :class="{'default-bg': bg}">
    <u-tabs :current="value" :list="list" @change="change"></u-tabs>
  </view>
</template>

<script>
    import UTab from '../../uni_modules/uview-ui/components/u-tabs/props.js'
    export default {
        props: {
            ...UTab.props,
            value: {
              type: Number
            },
            bg: {
              type: Boolean,
              default: false
            }
        },
        methods: {
          change(e) {
            console.log(e)
            this.$emit('input', e.index)
            this.$emit('change', e)
          }
        }
    }
</script>

<style lang="scss" scoped>
    .u-tabs{
        margin-bottom: 10rpx;
    }
    .default-bg {
      background-color: #fff;
    }
</style>